export function paramObj(url, obj) {
    let str = url.charAt(url.length - 1) === '/'? url.replace(/\/$/, '?'): url + '?';
    Object.keys(obj).forEach(key => {
        if (obj[key] instanceof Array) {
            obj[key].forEach(val => {
                str += `${key}=${val}&`;
            })
        } else {
            str += `${key}=${obj[key]}&`;
        }
    })
    str = str.replace(/\&$/, '');
    return str;
}